package com._520it.crm.web.controller;

import com._520it.crm.domain.Department;
import com._520it.crm.domain.Employee;
import com._520it.crm.page.PageResult;
import com._520it.crm.query.EmployeeQueryObject;
import com._520it.crm.service.IDepartmentService;
import com._520it.crm.service.IEmployeeService;
import com._520it.crm.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by ASUS on 2017/10/9.
 */
@Controller
@RequestMapping("/department")
public class DepartmentController {
    @Autowired
    private IDepartmentService departmentService;

    @RequestMapping("/queryDepartmentList")
    @ResponseBody
    public List<Department> queryDepartmentList(){
        List<Department> result =null;
        result =departmentService.selectAll();
        return  result;
    }
}
